<?php if (!defined('THINK_PATH')) exit();?>	<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>广东国防教育学会</title>
		<meta name="viewport" content="initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.min.css" />
		<link rel="stylesheet" href="http://idangero.us/swiper/dist/css/swiper.min.css" />
		<link rel="stylesheet" href="/Public/Home/activity/css/style.css" />
	</head>
	<body>

		<div class="bar bar-nav">
			<h1 class="title">讨论列表</h1>
			<i class="icon icon-left" onclick="window.history.go(-1);"></i>
		</div>
		<nav class="bar discuss_nav bar-tab">
				<input class="js-bm" readonly="readonly" type="text" placeholder="我要讨论.." />
		</nav>

		<div class="content">
			<div class="row discuss no-border" style="margin-top:0;">
				<div class="col-100">
					<div class="content-padded">
						<div class="list-block media-list" style="margin-top:0;">
							<ul>
                                                            <?php if(is_array($comment)): foreach($comment as $cc=>$comment): ?><li class="item-content">
									<div class="item-media">
										<img src="<?php echo ($comment['headimgurl']); ?>">
									</div>
									<div class="item-inner">
										<div class="item-title-row">
											<div class="item-title"><?php echo ($comment['user_name']); ?><span class="pull-right"><?php echo (date('Y-m-d',$comment['add_time'])); ?></span></div>
										</div>
										<div class="item-subtitle"><?php echo ($comment['content']); ?></div>
									</div>
								</li><?php endforeach; endif; ?>
								
							</ul>
						</div>
					</div>
				</div>
			</div>
						<div class="discuss_bot">-没有更多的评论了-</div>
			
			
			
			<div class="activity_from_bg" style="display: none;"></div>
			<div class="activity_from discuss_from" style="display: none;">
				
				<form>
					<div class="list-block">
					<span class="discuss_from_btn" id='submit'>确定</span>
					<span class="discuss_from_btn discuss_from_btn2 js-bm">取消</span>
						<div class="item-title text-center">我要讨论</div>
    <ul>
      <!-- Text inputs -->
      <li>
        <div class="item-content">
          <div class="item-inner">
            <div class="item-input">
                <form id='submitForm' onsubmit="return false;">
            	<textarea class="js_discuss_bottom_text" placeholder="我要评论..."></textarea>
                </form>
            </div>
          </div>
        </div>
      </li>
    </ul>
  </div>
  <div class="content-block">
    <div class="row">
    </div>
  </div>
				</form>
			</div>
</div>


		<script type="text/javascript" src="http://g.alicdn.com/sj/lib/jquery/dist/jquery.min.js"></script>
		<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
		<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
		<script src="http://idangero.us/swiper/dist/js/swiper.min.js"></script>
		<script type="text/javascript" src="/Public/Home/activity/js/huodon.js" ></script>
		<script>
			
			var swiper = new Swiper('.swiper-container', {
				pagination: '.swiper-pagination',
				paginationClickable: true,
				loop:true,    
				grabCursor: true,
				autoplay: 3000
			});
			
			 /* $(document).on('click','.open-preloader', function () {
				 Zepto.showPreloader('加载中...')
				    setTimeout(function () {
				    	 Zepto.hidePreloader();
				    }, 2000); 
			 }); */
			 $(document).on('click','.open-indicator', function () {
				 Zepto.showIndicator();
			     setTimeout(function () {
			    	Zepto.hideIndicator();
			     }, 2000);
			  });
		</script>
		

	</body>

</html>

<script>
    $('#submit').click(function(){
        $.ajax({
            url:"<?php echo U('Apply/discuss_list');?>",
            dataType: 'json',
            type:'post',
            data:{content:$('.js_discuss_bottom_text').val(),id:'<?php echo ($id); ?>'},
            success:function(data){
                console.log(data);
                if(data.status == 1){
                     Zepto.confirm(data.message,'提示',function(){
                          window.location.href="<?php echo U('Apply/discuss_list',array('id'=>$id));?>";
                     });
			 return false;
                }else if(data.status == 2){
                     Zepto.toast(data.message, 2000, 'success top');
			 return false;
                }
            }
        });
    });
</script>